<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

  <xsl:import href="../../../web/sys/resolver.xsl"/>

  <!-- map special paths -->

	<xsl:template match="uri[@ext = 'pdf']">
		<access obj="{$basePath}/fo/pdf" scope="view">
			<param key="ref" value="{$dataPath}/{@relativeName}"/>
		</access>
	</xsl:template>
	
	<!-- special views -->
  
  <xsl:template match="uri[@relative = 'example/BusinessPlan.html']">
    <access obj="{$basePath}/example/BusinessPlan" scope="view"/>
  </xsl:template>
  
	<xsl:template match="uri[@relative = 'Intro.html']">
		<access obj="{$basePath}/{@relativeName}" scope="view"/>
	</xsl:template>
	
	<xsl:template match="uri[@relative = 'News.html']">
		<access obj="{$basePath}/{@relativeName}" scope="view"/>
	</xsl:template>
	
	<xsl:template match="uri[ends-with(@full, '/Journal.html')]">
    <access obj="{$basePath}/Journal" scope="view">
    	<param key="ref" value="{$dataPath}/{@relativeName}"/>
    </access>
  </xsl:template>
  
  <xsl:template match="uri[@relative = 'PublicIntro.html']">
    <access obj="{$basePath}/PublicIntro" scope="view"/>
  </xsl:template>
  
	<xsl:template match="uri[matches(@relative, '^pm/Roadmap.*\.html$')]">
		<access scope="view" obj="{$basePath}/document">
			<param key="ref" value="{$basePath}/pm/Roadmap_prep?ref={$dataPath}/{@relativeName}"/>
		</access>
	</xsl:template>
	
	<xsl:template match="uri[@relative = 'pm/Roadmap.pdf']" priority="2">
    <access scope="view" obj="{$basePath}/fo/pdf">
      <param key="ref" value="{$basePath}/pm/Roadmap_prep"/>
    </access>
  </xsl:template>
  
	<xsl:template match="uri[@relative = 'deploy/Download.html']">
    <access scope="view" obj="{$basePath}/document">
    	<param key="ref" value="{$dataPath}/{@relativeName}"/>
      <param key="incl-tools" value="0"/>
    </access>
  </xsl:template>
  
</xsl:stylesheet>